//------------------------------------------------------------------------------
#ifndef APPLICATION_H
#define APPLICATION_H
//------------------------------------------------------------------------------
#include <QApplication>
#include <QStringList>
#include <QSettings>
//------------------------------------------------------------------------------
#define App							Application::instance()
#define APPLICATION_NAME		"Systray Notifier"
#define ORGANIZATION_NAME		"Systray Notifier"
#define APPLICATION_VERSION	"0.2"
//------------------------------------------------------------------------------
#define	CONFIG_KEY_FONT_COLOR		"TrayIcon/FontColor"
#define	CONFIG_KEY_FONT				"TrayIcon/Font"
//------------------------------------------------------------------------------
#define	DEFAULT_FONT_COLOR			QColor(0,0,0)
#define	DEFAULT_FONT					QFont("Arial")
//------------------------------------------------------------------------------
class Application : public QApplication {
	Q_OBJECT

	public:
		~Application();

		static void create(int& argc, char* argv[]);
		static void destroy();
		static Application& instance(){ return *m_instance; }

		const QStringList & args() const { return m_args; }
		QSettings *preferences();

	private:
		explicit Application(int& argc, char* argv[]);
		static QStringList arguments(){
			return QCoreApplication::arguments();
		}

	private:
		static Application *m_instance;
		QSettings *m_preferences;
		QStringList m_args;
};
//------------------------------------------------------------------------------
#endif // APPLICATION_H
//------------------------------------------------------------------------------
